home *** CD-ROM | disk | FTP | other *** search
/ Yellows - Privacy (Deluxe) / Akira Gomi Photographs - Yellows: Privacy (Deluxe) - Disc 1.iso / mono / c.dxr / 00068.ls < prev    next >
Encoding:
Text File  |  1996-07-06  |  11.0 KB  |  367 lines

  1. global amonopict, bmonopict, cmonopict, apictlist, bpictlist, cpictlist, textnum, textlist, spnumlist, changelist, layoutnum, vspritelist, mode, captionmode, keydetect, event
  2.  
  3. on startMovie
  4.   inits()
  5.   init()
  6. end
  7.  
  8. on inits
  9.   set amonopict to 7
  10.   set bmonopict to 9
  11.   set cmonopict to 9
  12.   set textnum to 6
  13.   set apictlist to []
  14.   set bpictlist to []
  15.   set cpictlist to []
  16.   set textlist to []
  17.   set vspritelist to []
  18.   repeat with i = 1 to amonopict
  19.     add(apictlist, i)
  20.   end repeat
  21.   repeat with i = 1 to bmonopict
  22.     add(bpictlist, i)
  23.   end repeat
  24.   repeat with i = 1 to cmonopict
  25.     add(cpictlist, i)
  26.   end repeat
  27.   repeat with i = 1 to textnum
  28.     add(textlist, i)
  29.   end repeat
  30.   puppetSprite(3, 1)
  31.   set the ink of sprite 3 to 0
  32.   set the type of sprite 3 to 1
  33.   set the foreColor of sprite 3 to 255
  34.   set the backColor of sprite 3 to 0
  35.   set the locH of sprite 3 to 429
  36.   set the locV of sprite 3 to 240
  37.   repeat with i = 10 to 12
  38.     puppetSprite(i, 1)
  39.     set the ink of sprite i to 0
  40.     set the type of sprite i to 1
  41.     set the foreColor of sprite i to 255
  42.     set the backColor of sprite i to 0
  43.     set the visible of sprite i to 0
  44.   end repeat
  45. end
  46.  
  47. on initlista
  48.   repeat with i = 1 to amonopict
  49.     add(apictlist, i)
  50.   end repeat
  51. end
  52.  
  53. on initlistb
  54.   repeat with i = 1 to bmonopict
  55.     add(bpictlist, i)
  56.   end repeat
  57. end
  58.  
  59. on initlistc
  60.   repeat with i = 1 to cmonopict
  61.     add(cpictlist, i)
  62.   end repeat
  63. end
  64.  
  65. on inittext
  66.   repeat with i = 1 to textnum
  67.     add(textlist, i)
  68.   end repeat
  69. end
  70.  
  71. on settext
  72.   set text to getAt(textlist, random(count(textlist)))
  73.   deleteAt(textlist, getPos(textlist, text))
  74.   puppetSprite(9, 1)
  75.   set the ink of sprite 9 to 0
  76.   set the type of sprite 9 to 1
  77.   set the foreColor of sprite 9 to 255
  78.   set the backColor of sprite 9 to 0
  79.   set the castNum of sprite 9 to the number of member ("text" & text & captionmode)
  80.   set the locH of sprite 9 to 109
  81.   set the locV of sprite 9 to 240
  82. end
  83.  
  84. on textchange
  85.   judgelist()
  86.   set text to getAt(textlist, random(count(textlist)))
  87.   deleteAt(textlist, getPos(textlist, text))
  88.   set the castNum of sprite 9 to the number of member ("text" & text & captionmode)
  89.   set the locH of sprite 9 to 109
  90.   set the locV of sprite 9 to 240
  91.   updateStage()
  92. end
  93.  
  94. on layout1
  95.   set spnumlist to [10, 11, 12]
  96.   set changelist to [10, 11, 12]
  97.   judgelist()
  98.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  99.   deleteAt(cpictlist, getPos(cpictlist, c1))
  100.   if cpictlist = [] then
  101.     initlistc()
  102.     deleteAt(cpictlist, getPos(cpictlist, c1))
  103.   end if
  104.   set c2 to getAt(cpictlist, random(count(cpictlist)))
  105.   deleteAt(cpictlist, getPos(cpictlist, c2))
  106.   judgelist()
  107.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  108.   deleteAt(bpictlist, getPos(bpictlist, b1))
  109.   set the castNum of sprite 10 to the number of member ("C" & c1)
  110.   set the locH of sprite 10 to 359
  111.   set the locV of sprite 10 to 128
  112.   set the castNum of sprite 11 to the number of member ("B" & b1)
  113.   set the locH of sprite 11 to 556
  114.   set the locV of sprite 11 to 329
  115.   set the castNum of sprite 12 to the number of member ("C" & c2)
  116.   set the locH of sprite 12 to 331
  117.   set the locV of sprite 12 to 333
  118. end
  119.  
  120. on layout2
  121.   set spnumlist to [10, 11, 12]
  122.   set changelist to [10, 11, 12]
  123.   judgelist()
  124.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  125.   deleteAt(cpictlist, getPos(cpictlist, c1))
  126.   if cpictlist = [] then
  127.     initlistc()
  128.     deleteAt(cpictlist, getPos(cpictlist, c1))
  129.   end if
  130.   set c2 to getAt(cpictlist, random(count(cpictlist)))
  131.   deleteAt(cpictlist, getPos(cpictlist, c2))
  132.   judgelist()
  133.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  134.   deleteAt(bpictlist, getPos(bpictlist, b1))
  135.   set the castNum of sprite 10 to the number of member ("C" & c1)
  136.   set the locH of sprite 10 to 331
  137.   set the locV of sprite 10 to 148
  138.   set the castNum of sprite 12 to the number of member ("B" & b1)
  139.   set the locH of sprite 12 to 555
  140.   set the locV of sprite 12 to 152
  141.   set the castNum of sprite 11 to the number of member ("C" & c2)
  142.   set the locH of sprite 11 to 358
  143.   set the locV of sprite 11 to 353
  144. end
  145.  
  146. on layout3
  147.   set spnumlist to [10, 11, 12]
  148.   set changelist to [10, 11, 12]
  149.   judgelist()
  150.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  151.   deleteAt(cpictlist, getPos(cpictlist, c1))
  152.   judgelist()
  153.   set a1 to getAt(apictlist, random(count(apictlist)))
  154.   deleteAt(apictlist, getPos(apictlist, a1))
  155.   judgelist()
  156.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  157.   deleteAt(bpictlist, getPos(bpictlist, b1))
  158.   set the castNum of sprite 10 to the number of member ("C" & c1)
  159.   set the locH of sprite 10 to 331
  160.   set the locV of sprite 10 to 88
  161.   set the castNum of sprite 11 to the number of member ("B" & b1)
  162.   set the locH of sprite 11 to 331
  163.   set the locV of sprite 11 to 318
  164.   set the castNum of sprite 12 to the number of member ("A" & a1)
  165.   set the locH of sprite 12 to 541
  166.   set the locV of sprite 12 to 328
  167. end
  168.  
  169. on layout4
  170.   set spnumlist to [10, 11, 12]
  171.   set changelist to [10, 11, 12]
  172.   judgelist()
  173.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  174.   deleteAt(cpictlist, getPos(cpictlist, c1))
  175.   judgelist()
  176.   set a1 to getAt(apictlist, random(count(apictlist)))
  177.   deleteAt(apictlist, getPos(apictlist, a1))
  178.   judgelist()
  179.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  180.   deleteAt(bpictlist, getPos(bpictlist, b1))
  181.   set the castNum of sprite 10 to the number of member ("C" & c1)
  182.   set the locH of sprite 10 to 331
  183.   set the locV of sprite 10 to 391
  184.   set the castNum of sprite 11 to the number of member ("B" & b1)
  185.   set the locH of sprite 11 to 331
  186.   set the locV of sprite 11 to 162
  187.   set the castNum of sprite 12 to the number of member ("A" & a1)
  188.   set the locH of sprite 12 to 542
  189.   set the locV of sprite 12 to 151
  190. end
  191.  
  192. on layout5
  193.   set spnumlist to [10, 11, 12]
  194.   set changelist to [10, 11, 12]
  195.   judgelist()
  196.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  197.   deleteAt(cpictlist, getPos(cpictlist, c1))
  198.   judgelist()
  199.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  200.   deleteAt(bpictlist, getPos(bpictlist, b1))
  201.   if bpictlist = [] then
  202.     initlistb()
  203.     deleteAt(bpictlist, getPos(bpictlist, b1))
  204.   end if
  205.   set b2 to getAt(bpictlist, random(count(bpictlist)))
  206.   deleteAt(bpictlist, getPos(bpictlist, b2))
  207.   set the castNum of sprite 10 to the number of member ("B" & b1)
  208.   set the locH of sprite 10 to 303
  209.   set the locV of sprite 10 to 113
  210.   set the castNum of sprite 11 to the number of member ("B" & b2)
  211.   set the locH of sprite 11 to 331
  212.   set the locV of sprite 11 to 367
  213.   set the castNum of sprite 12 to the number of member ("C" & c1)
  214.   set the locH of sprite 12 to 528
  215.   set the locV of sprite 12 to 165
  216. end
  217.  
  218. on layout6
  219.   set spnumlist to [10, 11, 12]
  220.   set changelist to [10, 11, 12]
  221.   judgelist()
  222.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  223.   deleteAt(cpictlist, getPos(cpictlist, c1))
  224.   judgelist()
  225.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  226.   deleteAt(bpictlist, getPos(bpictlist, b1))
  227.   if bpictlist = [] then
  228.     initlistb()
  229.     deleteAt(bpictlist, getPos(bpictlist, b1))
  230.   end if
  231.   set b2 to getAt(bpictlist, random(count(bpictlist)))
  232.   deleteAt(bpictlist, getPos(bpictlist, b2))
  233.   set the castNum of sprite 10 to the number of member ("B" & b1)
  234.   set the locH of sprite 10 to 331
  235.   set the locV of sprite 10 to 113
  236.   set the castNum of sprite 11 to the number of member ("B" & b2)
  237.   set the locH of sprite 11 to 303
  238.   set the locV of sprite 11 to 367
  239.   set the castNum of sprite 12 to the number of member ("C" & c1)
  240.   set the locH of sprite 12 to 528
  241.   set the locV of sprite 12 to 314
  242. end
  243.  
  244. on layout7
  245.   set spnumlist to [10, 11, 12]
  246.   set changelist to [10, 11, 12]
  247.   judgelist()
  248.   set c1 to getAt(cpictlist, random(count(cpictlist)))
  249.   deleteAt(cpictlist, getPos(cpictlist, c1))
  250.   judgelist()
  251.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  252.   deleteAt(bpictlist, getPos(bpictlist, b1))
  253.   if bpictlist = [] then
  254.     initlistb()
  255.     deleteAt(bpictlist, getPos(bpictlist, b1))
  256.   end if
  257.   set b2 to getAt(bpictlist, random(count(bpictlist)))
  258.   deleteAt(bpictlist, getPos(bpictlist, b2))
  259.   set the castNum of sprite 10 to the number of member ("B" & b1)
  260.   set the locH of sprite 10 to 330
  261.   set the locV of sprite 10 to 367
  262.   set the castNum of sprite 11 to the number of member ("B" & b2)
  263.   set the locH of sprite 11 to 528
  264.   set the locV of sprite 11 to 340
  265.   set the castNum of sprite 12 to the number of member ("C" & c1)
  266.   set the locH of sprite 12 to 331
  267.   set the locV of sprite 12 to 138
  268. end
  269.  
  270. on layout8
  271.   set spnumlist to [10, 11]
  272.   set changelist to [10, 11]
  273.   judgelist()
  274.   set a1 to getAt(apictlist, random(count(apictlist)))
  275.   deleteAt(apictlist, getPos(apictlist, a1))
  276.   if apictlist = [] then
  277.     initlista()
  278.     deleteAt(apictlist, getPos(apictlist, a1))
  279.   end if
  280.   set a2 to getAt(apictlist, random(count(apictlist)))
  281.   deleteAt(apictlist, getPos(apictlist, a2))
  282.   set the castNum of sprite 10 to the number of member ("A" & a1)
  283.   set the locH of sprite 10 to 316
  284.   set the locV of sprite 10 to 179
  285.   set the castNum of sprite 11 to the number of member ("A" & a2)
  286.   set the locH of sprite 11 to 541
  287.   set the locV of sprite 11 to 301
  288.   set the visible of sprite 12 to 0
  289. end
  290.  
  291. on layout9
  292.   set spnumlist to [10, 11, 12]
  293.   set changelist to [10, 11, 12]
  294.   judgelist()
  295.   set a1 to getAt(apictlist, random(count(apictlist)))
  296.   deleteAt(apictlist, getPos(apictlist, a1))
  297.   judgelist()
  298.   set b1 to getAt(bpictlist, random(count(bpictlist)))
  299.   deleteAt(bpictlist, getPos(bpictlist, b1))
  300.   if bpictlist = [] then
  301.     initlistb()
  302.     deleteAt(bpictlist, getPos(bpictlist, b1))
  303.   end if
  304.   set b2 to getAt(bpictlist, random(count(bpictlist)))
  305.   deleteAt(bpictlist, getPos(bpictlist, b2))
  306.   set the castNum of sprite 10 to the number of member ("A" & a1)
  307.   set the locH of sprite 10 to 316
  308.   set the locV of sprite 10 to 291
  309.   set the castNum of sprite 11 to the number of member ("B" & b1)
  310.   set the locH of sprite 11 to 528
  311.   set the locV of sprite 11 to 113
  312.   set the castNum of sprite 12 to the number of member ("B" & b2)
  313.   set the locH of sprite 12 to 528
  314.   set the locV of sprite 12 to 367
  315. end
  316.  
  317. on judgelist
  318.   if apictlist = [] then
  319.     initlista()
  320.   end if
  321.   if bpictlist = [] then
  322.     initlistb()
  323.   end if
  324.   if cpictlist = [] then
  325.     initlistc()
  326.   end if
  327.   if textlist = [] then
  328.     inittext()
  329.   end if
  330. end
  331.  
  332. on showsprite
  333.   set a to random(count(spnumlist))
  334.   if a = 1 then
  335.     nothing()
  336.   else
  337.     set a to a - 1
  338.   end if
  339.   repeat with i = 1 to a
  340.     set spnum to getAt(spnumlist, random(count(spnumlist)))
  341.     deleteAt(spnumlist, getPos(spnumlist, spnum))
  342.     add(vspritelist, spnum)
  343.   end repeat
  344.   repeat with i = 1 to count(vspritelist)
  345.     set the visible of sprite getAt(vspritelist, i) to 1
  346.   end repeat
  347. end
  348.  
  349. on judgename castname
  350.   judgelist()
  351.   if castname = "A" then
  352.     set castNum to getAt(apictlist, random(count(apictlist)))
  353.     deleteAt(apictlist, getPos(apictlist, castNum))
  354.     return castNum
  355.   end if
  356.   if castname = "B" then
  357.     set castNum to getAt(bpictlist, random(count(bpictlist)))
  358.     deleteAt(bpictlist, getPos(bpictlist, castNum))
  359.     return castNum
  360.   end if
  361.   if castname = "C" then
  362.     set castNum to getAt(cpictlist, random(count(cpictlist)))
  363.     deleteAt(cpictlist, getPos(cpictlist, castNum))
  364.     return castNum
  365.   end if
  366. end
  367.